<#include "../common/layout.ftl"/>
<@layout>
<div width="100%">
	<div class="dxfsqd_title">公告</div>
	<div class="dxfsqd_shearch">
		<#if session.userRole == 'admin' || session.userRole == 'brandManager' || session.userRole == 'middleManager'>
			<a class="dc_exc" style=" background: red;" href="/notice/add"><i class="icon-user icon-white"></i>添加公告</a>
		</#if>
  </div>
<div class="dxfsqd_table">

	<table class="table table-bordered table-striped">
		<thead>
		  <tr>
			<th scope="col">标题</th>
			<th scope="col">信息来源</th>
			<th scope="col">内容</th>
			<th scope="col">时间</th>
			<th scope="col">操作</th>
		  </tr>
		</thead>
		<tbody>
		<#list page.list as notice>
		  <tr>
			<td>
			 ${notice.title!""}
			</td>
			<td>
			  ${notice.source!""}
			</td>
			<td>
			  ${notice.content!""}
			</td>
			<td>
			   ${notice.time!""}
			</td>
			
			<td>
				<div class="btn-group">
					 <#if session.userRole == 'admin' || session.userRole == 'brandManager' || session.userRole == 'middleManager'>
					 	<a class="btn btn-primary" href="/notice/edit/${notice.id}"><i class="icon-info-sign icon-white"></i> 修 改</a>
					 </#if>
					 <#if session.userRole == 'admin' || session.userRole == 'brandManager' || session.userRole == 'middleManager'>
					 	<a class="btn btn-primary" href="/notice/delete/${notice.id}"><i class="icon-trash icon-white"></i> 删 除</a>
					 </#if>
				</div>
			</td>
		  </tr>
		</#list>
		</tbody>
	</table>  
	<#include "../common/paginate.ftl" />
	<@paginate currentPage=page.pageNumber totalPage=page.totalPage actionUrl="/notice/" />
</div>
</div>
          
</@layout>